/**
 * 电流表
 */
Ammeter = Widget.extend({
	ctor:function(parent){
		this._super();
		parent.addChild(this,30);
		this.init();
		this.setTag(TAG_AMMETER);
	},
	init:function(){
		this.setCascadeOpacityEnabled(true);
		this.setScale(0.8);
		
		// 电流表
		var ammeter = new Button(this, 10, TAG_AMMETER_BODY, "#ammeter.png", this.callback);
		ammeter.setPosition(cc.p(1250,460));
		//  指针
		var finger = new Button(ammeter, 10, TAG_AMMETER_FINGER, "#finger.png", this.callback);
		finger.setPosition(cc.p(159,142));
		finger.setAnchorPoint(1,0);
		
		this.callNext = cc.callFunc(function(){
			gg.flow.next();
		}, this);
		this.callNext.retain();
	},
	callback:function (p){
		var action=gg.flow.flow.action;
		var func=cc.callFunc(this.actionDone,this);
		switch(p.getTag()){
		case TAG_FLASK1:

			break;
		case TAG_FLASK2:

			break;
		default:
			break;
		}
	},
	actionDone:function(p){
		var action=gg.flow.flow.action;
		switch(p.getTag()){
		case TAG_FLASK1:

			break;
		case TAG_FLASK2:

			break;
		default:
			break;
		}
		gg.flow.next();
	},
	onExit:function(){
		this._super();
		this.callNext.release();
	}
})